﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Drawing;

namespace GT
{
    public static partial class Extensions
    {
        public static Color And(this Color color, Color blendColor)
        {
            return Color.FromArgb(color.R & blendColor.R, color.G & blendColor.G, color.B & blendColor.B);
        }

        public static Color Or(this Color color, Color blendColor)
        {
            return Color.FromArgb(color.R | blendColor.R, color.G | blendColor.G, color.B | blendColor.B);
        }

        public static Color Not(this Color color)
        {
            return Color.FromArgb(~color.R, ~color.G, ~color.B);
        }

        public static Color Invert(this Color color)
        {
            return Color.FromArgb(255 - color.R, 255 - color.G, 255 - color.B);
        }
    }
}
